package com.huiquan.body.dao;

import com.huiquan.body.domain.BodyOrganSymptom;
import com.huiquan.body.domain.BodyOrganSymptomVO;
import com.huiquan.framework.base.EnhancedBaseDao;
import com.ibatis.sqlmap.client.SqlMapClient;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Repository
public class BodyOrganSymptomDao extends EnhancedBaseDao<BodyOrganSymptom> {

    @Resource(name = "sqlMapClient")
    private SqlMapClient sqlMapClient;

    public static final String space = "BODY_ORGAN_SYMPTOM.";

    public BodyOrganSymptomDao() {
        super(space);
    }

    /**
     * @param params
     * @return
     */
    public int selectSymptomVOCount(Map<String, Object> params) {
        return (int) this.object(space + "SELECT_SYMPTOM_VO_COUNT", params, sqlMapClient);
    }

    @SuppressWarnings("unchecked")
    public List<BodyOrganSymptomVO> selectSymptomVOList(Map<String, Object> params) {
        return (List<BodyOrganSymptomVO>) this.list(space + "SELECT_SYMPTOM_VO_LIST", params, sqlMapClient);
    }
}
